import React,{Component,Link} from 'react';
import NavLink from './NavLink';
import './../Sass/app.scss';

class App extends Component{
    render(){   
        return (
            <div>
                <div className="page-header row">
                    <h1>璎珞天下 <small><span id="tempyl">加入璎珞</span><span>看看璎珞</span></small></h1>
                </div>
                {/* header */}
                
                <nav className="navbar navbar-inverse">
                    <div className="container-fluid">
                        <div className="navbar-header">
                            <button type="button" className="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                                <span className="sr-only">Toggle navigation</span>
                                <span className="icon-bar"></span>
                                <span className="icon-bar"></span>
                                <span className="icon-bar"></span>
                            </button>
                        </div>
                        <div className="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                        <ul className="nav navbar-nav">
                            <li><NavLink to='/' onlyActiveOnIndex activeClass="acitve">首页</NavLink></li>
                            <li><NavLink to='/news' activeClass="acitve">璎珞新闻</NavLink></li>
                            <li><NavLink to='/spcar' activeClass="acitve">购物车</NavLink></li>
                            <li><NavLink to='/comment' activeClass="acitve">Comment</NavLink></li>
                            <li className="dropdown">
                            <a href="#" className="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span className="caret"></span></a>
                            <ul className="dropdown-menu">
                                <li><a href="#">Action</a></li>
                                <li><a href="#">Another action</a></li>
                                <li><a href="#">Something else here</a></li>
                                <li role="separator" className="divider"></li>
                                <li><a href="#">Separated link</a></li>
                                <li role="separator" className="divider"></li>
                                <li><a href="#">One more separated link</a></li>
                            </ul>
                            </li>
                        </ul>
                        <form className="navbar-form navbar-left">
                            <div className="form-group">
                            <input type="text" className="form-control" placeholder="Search"/>
                            </div>
                            <button type="submit" className="btn btn-default">Submit</button>
                        </form>
                        <ul className="nav navbar-nav navbar-right">
                            <li><a href="#">Link</a></li>
                            <li className="dropdown">
                            <a href="#" className="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span className="caret"></span></a>
                            <ul className="dropdown-menu">
                                <li><a href="#">Action</a></li>
                                <li><a href="#">Another action</a></li>
                                <li><a href="#">Something else here</a></li>
                                <li role="separator" className="divider"></li>
                                <li><a href="#">Separated link</a></li>
                            </ul>
                            </li>
                        </ul>
                        </div>
                    </div>
                    </nav>
                {/* banner */}
                {this.props.children}
                {/* footer */}
                <div id="footer" style={{height:200,background:"lightgrey",textAlign:"center"}}>
                    <h2>footer</h2>
                </div>
            </div>
        )
    }
}
module.exports = App;
